home *** CD-ROM | disk | FTP | other *** search
- Choose.com allows the setting of errorlevels in a DOS bat file. This
- enables you to write a menu driven front end.
-
- The procedure is simple - first call a text file containing the menu
- choices. Then insert the call to CHOOSE before the command(s)
- IF ERRORLEVEL <#> GOTO <label> -- where <#> is a number (in descending
- order) from 9 to 0 and <label> is a DOS label (e.g. :choiceone).
-
- You can use all ten numbers but this requires a ten different labels
- The program prompts for selection. After the selection is made, the bat
- file branches to the specific label. Here you can change directories and
- call programs. When control is returned to the bat file have a GOTO send
- the program back to the top and place the menu on the screen again.
-
- For an example of this, see the ASHTON-TATE TECH NOTES for March, 1986.
- The code for the program comes from pages 29 - 34.
-
- I have been using a program similar to this, but it didn't have the ability
- to echo the number of the choice to the screen. I find this a signigicant
- improvement. I use this program to call sub-menus which in turn call the
- main menu when the user decides to do so.
-